package com.jwgf.smarowindingmachine_unity.logic;


import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.ObservableEmitter;
import io.reactivex.rxjava3.core.ObservableOnSubscribe;

public class RxMerge2Event<T> {
    private ObservableEmitter<T> emitter;
    private Observable<T> observable = Observable.create(new ObservableOnSubscribe<T>() {
        @Override
        public void subscribe(ObservableEmitter<T> emitter) throws Exception {
            RxMerge2Event.this.emitter = emitter;
        }
    });

    public Observable<T> getObservable() {
        return observable;
    }

    public void onNext(T i) {
        emitter.onNext(i);
    }
}
